package com.zz.yt.test.delegate.confusion;

import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import androidx.annotation.Nullable;

import com.whf.android.jar.dao.TokenDao;
import com.whf.android.jar.dao.UserDao;
import com.whf.android.jar.base.latte.BaseActivity;
import com.zz.yt.test.R;

public class ConfusionActivity extends BaseActivity {
    @Override
    protected Object setLayout() {
        return R.layout.activity_main;
    }

    @Override
    public void onBindView(@Nullable Bundle savedInstanceState) {
        addMarginTopEqualStatusBarHeight(findViewById(R.id.id_title));
        setTextView(R.id.id_title, "查看混淆是否影响储存等");
        TokenDao.setAuthorization("Authorization 123");
        UserDao.setUserName("Authorization");
        UserDao.setHeadPic("头像");
        initView();
    }

    private void initView() {
        final String[] title = {
                TokenDao.getAuthorization(),
                UserDao.getHeadPic(),
                UserDao.getUserName(),
        };

        ListView idListView = findViewById(R.id.id_list_view);
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(
                this,
                android.R.layout.simple_list_item_1,
                title);
        idListView.setAdapter(adapter);
    }
}
